<template>
    <div>
        <input type="text" v-model="quer.xm">姓名
        <input type="text" v-model="quer.bh">编号
        <input type="text" v-model="quer.max">最大年龄
        <input type="text" v-model="quer.min">最小年龄
        <input type="button" value="查询" @click="xs" >


        <table>
            <thead>
                <tr>
                    <td>序号</td>
                    <td>姓名</td>
                    <td>年龄</td>
                    <td>编号</td>
                    <td>手机号</td>
                    <td>地址</td>
                    <td>性别</td>
                    <td>余额</td>
                    <td>创建时间</td>
                </tr>
            </thead>
            <tbody>
                <tr v-for="m in data">
                    <td>{{m.id}}</td>
                    <td>{{m.xm}}</td>
                    <td>{{m.nl}}</td>
                    <td>{{m.bh}}</td>
                    <td>{{m.sjh}}</td>
                    <td>{{m.dz}}</td>
                    <td>{{m.xb}}</td>
                    <td>{{m.ye}}</td>
                    <td>{{m.sj}}</td>
                </tr>
            </tbody>
        </table>

    </div>
</template>

<script setup lang="ts">
import axios from 'axios';
import { ref,onMounted } from 'vue';

const data=ref([{
    "id": 0,
  "xm": "string",
  "nl": 0,
  "bh": "string",
  "sjh": "string",
  "dz": "string",
  "xb": "string",
  "ye": 0,
  "sj": "2025-03-26T01:44:11.533Z"
}])
const quer=ref({
  "xm": "",
  "bh": "",
    max:0,
    min:0
})
onMounted(()=>{
    xs();
})
const xs=()=>{
    axios.get("https://localhost:7160/api/we/xs",{params:quer.value}).then(res=>{
        data.value=res.data
    })
}
</script>

<style scoped>

</style>